import  {xsEntity} from './commentity';
import {  Column, Entity,  JoinTable,  ManyToMany,   } from 'typeorm';
import { UserEntity } from './user';

/**
 * 描述
 */
@Entity()
export class GroupEntity extends xsEntity {
    // @ManyToMany(() => UserEntity, UserEntity => UserEntity.friends)
    // @JoinTable()
    // user: UserEntity[];


    @ManyToMany(() => UserEntity, user => user.groupChats)
    @JoinTable()
    members: UserEntity[];

  
    @Column({ comment: '群聊昵称', default: null })
    name: string;
  
    @Column({ comment: '群聊头像', default: null })
    avatar: string;
}
